using System.ComponentModel;
using System.Drawing.Design;
using System.Windows.Forms;
using System.Xml;

namespace SPDevExplorer
{
    public class SharePointProperties
    {
        private readonly XmlElement _xml;

        public SharePointProperties(TreeNode n)
        {
            _xml = (XmlElement) n.Tag;
        }

        public SharePointProperties(XmlElement xml)
        {
            _xml = xml;
        }

        public XmlElement Xml
        {
            get { return _xml; }
        }

        public string Url
        {
            get { return _xml.GetAttribute("Url"); }
        }

        public string Name
        {
            get { return _xml.GetAttribute("Name"); }
        }

        public string ID
        {
            get { return _xml.GetAttribute("ID"); }
        }
    }
}